import router_yt from './yt';



const loginRouter = [
	{path: '/login',name: 'login', component: resolve => { require(['@/themes/user/login.vue'], resolve); }},
	{path: '/reg',name: 'reg', component: resolve => { require(['@/themes/user/reg.vue'], resolve); }}
];



//系统
const systems = [
	{name: 'admin',path: '/admin', component: resolve => { require(['@/themes/system/admin/index.vue'], resolve); } },
	{name: 'admin_info',path: '/admin_info/:id', component: resolve => { require(['@/themes/system/admin/info.vue'], resolve); } },
	{name: 'admin_add',path: '/admin_add', component: resolve => { require(['@/themes/system/admin/add.vue'], resolve); } },
	{name: 'config',path: '/config', component: resolve => { require(['@/themes/system/config.vue'], resolve); } },
	
	//权限
	{name: 'role',path: '/role', component: resolve => { require(['@/themes/system/role/index.vue'], resolve); } },
	{name: 'role_info',path: '/role_info/:id', component: resolve => { require(['@/themes/system/role/info.vue'], resolve); } },
	{name: 'role_add',path: '/role_add', component: resolve => { require(['@/themes/system/role/add.vue'], resolve); } },
	
	//日志
	{name: 'log',path: '/log', component: resolve => { require(['@/themes/system/log/index.vue'], resolve); } },
	//字典
	{name: 'dist',path: '/dist', component: resolve => { require(['@/themes/system/dist/index.vue'], resolve); } },
	{name: 'dist_info',path: '/dist_info/:id', component: resolve => { require(['@/themes/system/dist/info.vue'], resolve); } },
	{name: 'dist_add',path: '/dist_add', component: resolve => { require(['@/themes/system/dist/add.vue'], resolve); } },
	//字段
	{name: 'dist_field',path: '/dist_field/:id', component: resolve => { require(['@/themes/system/dist/field_list.vue'], resolve); } },
	{name: 'dist_field_info',path: '/dist_field_info/:id', component: resolve => { require(['@/themes/system/dist/field_info.vue'], resolve); } },
	{name: 'dist_field_add',path: '/dist_field_add/:id', component: resolve => { require(['@/themes/system/dist/field_add.vue'], resolve); } },
];


//用户
const users = [
	/*
	{name: 'user',path: '/user', component: resolve => { require(['@/themes/user/user/index.vue'], resolve); } },
	{name: 'user_info',path: '/user_info/:id', component: resolve => { require(['@/themes/user/user/info.vue'], resolve); } },
	{name: 'user_add',path: '/user_add', component: resolve => { require(['@/themes/user/user/add.vue'], resolve); } },
	*/
	
	//部门
	{name: 'bumen',path: '/bumen/:id', component: resolve => { require(['@/themes/user/bumen/index.vue'], resolve); } },
	{name: 'bumen_info',path: '/bumen_info/:id', component: resolve => { require(['@/themes/user/bumen/info.vue'], resolve); } },
	{name: 'bumen_add',path: '/bumen_add/:id', component: resolve => { require(['@/themes/user/bumen/add.vue'], resolve); } },
	
	//团队
	{name: 'team',path: '/team', component: resolve => { require(['@/themes/user/team/index.vue'], resolve); } },
	{name: 'team_info',path: '/team_info/:id', component: resolve => { require(['@/themes/user/team/info.vue'], resolve); } },
	{name: 'team_add',path: '/team_add', component: resolve => { require(['@/themes/user/team/add.vue'], resolve); } },
	
	//公司
	{name: 'company',path: '/company', component: resolve => { require(['@/themes/user/company/index.vue'], resolve); } },
	{name: 'company_info',path: '/company_info/:id', component: resolve => { require(['@/themes/user/company/info.vue'], resolve); } },
	{name: 'company_add',path: '/company_add', component: resolve => { require(['@/themes/user/company/add.vue'], resolve); } },
	
	//科目
	{name: 'subject',path: '/subject', component: resolve => { require(['@/themes/user/subject/index.vue'], resolve); } },
	{name: 'subject_type',path: '/subject_type', component: resolve => { require(['@/themes/user/subject/type.vue'], resolve); } },
	
	//def_team
	{name: 'def_team',path: '/def_team', component: resolve => { require(['@/themes/user/def_team/index.vue'], resolve); } },
	//币种
	{name: 'multicurrency',path: '/multicurrency', component: resolve => { require(['@/themes/user/multicurrency/index.vue'], resolve); } },
];


//广告
const others = [
	{name: 'ads',path: '/ads', component: resolve => { require(['@/themes/other/ads/index.vue'], resolve); } },
	{name: 'ads_info',path: '/ads_info/:id', component: resolve => { require(['@/themes/other/ads/info.vue'], resolve); } },
	{name: 'ads_add',path: '/ads_add', component: resolve => { require(['@/themes/other/ads/add.vue'], resolve); } }
];


/*
const modules =[
	//车牌
	{name: 'chepai',path: '/chepai', component: resolve => { require(['@/themes/module/xianxing/chepai.vue'], resolve); } },
	{name: 'chuxing',path: '/chuxing', component: resolve => { require(['@/themes/module/xianxing/chuxing.vue'], resolve); } },
	
	//文章分类
	{name: 'article_cat',path: '/article_cat', component: resolve => { require(['@/themes/module/article/article_cat/index.vue'], resolve); } },
	{name: 'article_cat_info',path: '/article_cat_info/:id', component: resolve => { require(['@/themes/module/article/article_cat/info.vue'], resolve); } },
	{name: 'article_cat_add',path: '/article_cat_add', component: resolve => { require(['@/themes/module/article/article_cat/add.vue'], resolve); } },
	//文章
	{name: 'article',path: '/article', component: resolve => { require(['@/themes/module/article/article/index.vue'], resolve); } },
	{name: 'article_info',path: '/article_info/:id', component: resolve => { require(['@/themes/module/article/article/info.vue'], resolve); } },
	{name: 'article_add',path: '/article_add', component: resolve => { require(['@/themes/module/article/article/add.vue'], resolve); } },
];
*/



//会计
const accounting = [
	// {name: 'a_cash',path: '/a_cash', component: resolve => { require(['@/themes/accounting/cash/index.vue'], resolve); } },
	// {name: 'a_bank',path: '/a_bank', component: resolve => { require(['@/themes/accounting/bank/index.vue'], resolve); } },
	
	// {name: 'a_assets',path: '/a_assets', component: resolve => { require(['@/themes/accounting/assets/index.vue'], resolve); } },
	
	// {name: 'share_member',path: '/share_member', component: resolve => { require(['@/themes/accounting/share_member/index.vue'], resolve); } },
	// {name: 'share_income',path: '/share_income', component: resolve => { require(['@/themes/accounting/share_income/index.vue'], resolve); } },

];


//报表
const report = [
	// {name: 'sunyi_fengzi',path: '/sunyi_fengzi', component: resolve => { require(['@/themes/report/sunyi_fengzi/index.vue'], resolve); } },
	// {name: 'sunyi_team',path: '/sunyi_team', component: resolve => { require(['@/themes/report/sunyi_team/index.vue'], resolve); } },
	// {name: 'borrow_support',path: '/borrow_support', component: resolve => { require(['@/themes/report/borrow_support/index.vue'], resolve); } },
	
];
const home = [
	{name: 'home_index',path: '/index', component: resolve => { require(['@/themes/home/index.vue'], resolve); } },
	{name: 'my_account',path: '/my_account', component: resolve => { require(['@/themes/home/my_account.vue'], resolve); } },
	{name: 'login_log',path: '/login_log', component: resolve => { require(['@/themes/home/login_log.vue'], resolve); } },
];
const system = [
	{name: 's_system',path: '/s_system', component: resolve => { require(['@/themes/setting/system/index.vue'], resolve); } },
	{name: 's_user',path: '/s_user', component: resolve => { require(['@/themes/setting/user/index.vue'], resolve); } },
	{name: 'user_info',path: '/user_info/:id', component: resolve => { require(['@/themes/setting/user/info.vue'], resolve); } },
	{name: 'user_add',path: '/user_add', component: resolve => { require(['@/themes/setting/user/add.vue'], resolve); } },
	{name: 'user_view',path: '/user_view/:id', component: resolve => { require(['@/themes/setting/user/view.vue'], resolve); } },
	{name: 'user_log',path: '/user_log/:id', component: resolve => { require(['@/themes/setting/user/log.vue'], resolve); } },
];

const privs = [
	{name: 'r_role',path: '/r_role', component: resolve => { require(['@/themes/privs/role/index.vue'], resolve); } },
	{name: 'r_role_edit',path: '/r_role_edit/:id', component: resolve => { require(['@/themes/privs/role/edit.vue'], resolve); } },
	
	{name: 'r_log',path: '/r_log', component: resolve => { require(['@/themes/privs/log/index.vue'], resolve); } },
	
];

const appRouter = [
	
	{name:'home',path:'/',component:resolve => { require(['@/themes/index.vue'], resolve); },children:[
		
		
		{name: 'module',path: '/module', component: resolve => { require(['@/themes/module/index.vue'], resolve); } },
		...home,
		...users,
		...systems,
		...others,
		...accounting,
		...report,
		...router_yt,
		...system,
		...privs
	]},
	
];


// 所有上面定义的路由都要写在下面的routers里
const routers = [
	...loginRouter,
    ...appRouter
];

export default routers;